<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
      <title>腳本命令 | HiAPI-C# 2025 </title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta name="title" content="腳本命令 | HiAPI-C# 2025 ">
      
      
      <link rel="icon" href="../../../../img/HiAPI.favicon.ico">
      <link rel="stylesheet" href="../../../../public/docfx.min.css">
      <link rel="stylesheet" href="../../../../public/main.css">
      <meta name="docfx:navrel" content="../../../../toc.html">
      <meta name="docfx:tocrel" content="../toc.html">
      
      <meta name="docfx:rel" content="../../../../">
      
      
      
      <meta name="loc:inThisArticle" content="In this article">
      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
      <meta name="loc:tocFilter" content="Filter by title">
      <meta name="loc:nextArticle" content="Next">
      <meta name="loc:prevArticle" content="Previous">
      <meta name="loc:themeLight" content="Light">
      <meta name="loc:themeDark" content="Dark">
      <meta name="loc:themeAuto" content="Auto">
      <meta name="loc:changeTheme" content="Change theme">
      <meta name="loc:copy" content="Copy">
      <meta name="loc:downloadPdf" content="Download PDF">

      <script type="module" src="./../../../../public/docfx.min.js"></script>

      <script>
        const theme = localStorage.getItem('theme') || 'auto'
        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
      </script>

  </head>

  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
    <header class="bg-body border-bottom">
      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
        <div class="container-xxl flex-nowrap">
          <a class="navbar-brand" href="../../../../index.html">
            <img id="logo" class="svg" src="../../../../img/HiAPI.logo.png" alt="">
            
          </a>
          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
            <i class="bi bi-three-dots"></i>
          </button>
          <div class="collapse navbar-collapse" id="navpanel">
            <div id="navbar">
              <form class="search" role="search" id="search">
                <i class="bi bi-search"></i>
                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
              </form>
            </div>
          </div>
        </div>
      </nav>
    </header>

    <main class="container-xxl">
      <div class="toc-offcanvas">
        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
          <div class="offcanvas-header">
            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
          </div>
          <div class="offcanvas-body">
            <nav class="toc" id="toc"></nav>
          </div>
        </div>
      </div>

      <div class="content">
        <div class="actionbar">
          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
            <i class="bi bi-list"></i>
          </button>

          <nav id="breadcrumb"></nav>
        </div>

        <article data-uid="Doc-Script">
          <h1 id="腳本命令">腳本命令</h1>

<p>腳本命令是 HiNC 中執行加工仿真的核心功能。腳本使用 C# 語言編寫，可以直接調用 <a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> 的成員屬性和成員函數。</p>
<h2 id="快速開始">快速開始</h2>
<p>如果您是第一次使用腳本功能，建議先閱讀：</p>
<ol>
<li><strong><a href="Doc-Task/index.html">文件任務</a></strong> - 了解腳本的基本語法、執行順序和檔案路徑樣板</li>
<li><strong><a href="PlayNcFile/index.html">執行NC檔案</a></strong> - 學習如何執行 NC 檔案進行仿真</li>
</ol>
<h2 id="命令分類">命令分類</h2>
<h3 id="執行與控制">執行與控制</h3>
<ul>
<li><strong><a href="Doc-Task/index.html">文件任務</a></strong> - 腳本語法、執行順序、檔案路徑樣板</li>
<li><strong><a href="PlayNcFile/index.html">執行NC檔案</a></strong> - 執行 NC 檔案進行仿真</li>
<li><strong><a href="PlayNc/index.html">執行NC碼字串</a></strong> - 直接執行 NC 碼字串</li>
<li><strong><a href="PlayCsvFile/play-csv-file.html">執行CSV檔案</a></strong> - 以 CSV 格式檔案驅動仿真</li>
<li><strong><a href="PlayerControl/index.html">播放器控制</a></strong> - 控制播放器的執行速度、暫停和重置</li>
</ul>
<h3 id="事件與訊息">事件與訊息</h3>
<ul>
<li><strong><a href="Events/index.html">事件處理</a></strong> - 在加工過程中執行自訂邏輯</li>
<li><strong><a href="Messages/index.html">訊息處理</a></strong> - 顯示和管理訊息</li>
</ul>
<h3 id="屬性與變數">屬性與變數</h3>
<ul>
<li><strong><a href="Properties/index.html">屬性設定</a></strong> - 配置加工參數和行為</li>
<li><strong><a href="StepVariables/index.html">步階變數</a></strong> - 處理和存取加工步階的變數</li>
</ul>
<h3 id="動作與操作">動作與操作</h3>
<ul>
<li><strong><a href="RuntimeManagement/index.html">運行時管理</a></strong> - 管理加工仿真的運行時狀態</li>
<li><strong><a href="ActOperations/index.html">動作操作</a></strong> - 執行特定的加工動作</li>
<li><strong><a href="RuntimeGeom/index.html">運行時幾何</a></strong> - 讀寫程序幾何檔案</li>
<li><strong><a href="FlyPiece/index.html">離料</a></strong> - 移除五軸切削過程中的懸浮留料</li>
</ul>
<h3 id="幾何">幾何</h3>
<ul>
<li><strong><a href="Resolution/index.html">解析度</a></strong> - 設定仿真解析度（實體解析度、顯示解析度、加工運動解析度）</li>
<li><strong><a href="Collision/index.html">碰撞檢測</a></strong> - 啟用碰撞檢測功能</li>
<li><strong><a href="GeomDiff/index.html">幾何差異</a></strong> - 比對工件目標形狀與仿真後形狀</li>
</ul>
<h3 id="物理">物理</h3>
<ul>
<li><strong><a href="Physics/index.html">物理仿真設定</a></strong> - 配置物理仿真的行為</li>
<li><strong><a href="LoadCuttingPara/index.html">載入切削參數</a></strong> - 從檔案載入切削參數到工件</li>
</ul>
<h3 id="外部資料與模型訓練">外部資料與模型訓練</h3>
<ul>
<li><strong><a href="Mapping/index.html">映射</a></strong> - 將外部資料對應於仿真路徑</li>
<li><strong><a href="MillingTraining/index.html">銑削訓練</a></strong> - 訓練與校正銑削係數</li>
</ul>
<h3 id="優化">優化</h3>
<ul>
<li><strong><a href="NcOptimization/index.html">NC優化</a></strong> - NC 碼優化設定與輸出</li>
</ul>
<h3 id="輸出">輸出</h3>
<ul>
<li><strong><a href="WriteShotFiles/index.html">輸出Shot檔案</a></strong> - 輸出波形資料檔案</li>
<li><strong><a href="WriteStepFiles/index.html">輸出Step檔案</a></strong> - 輸出步資料檔案</li>
</ul>
<h3 id="工具設定">工具設定</h3>
<ul>
<li><strong><a href="ToolSetup/index.html">刀具與智慧刀把設置</a></strong> - 設定刀具安裝參數及智慧刀把觀察位置</li>
</ul>
<h2 id="相關資源">相關資源</h2>
<ul>
<li><a class="xref" href="../../../../api/Hi.MachiningProcs.RuntimeApi.html">RuntimeApi</a><small>(API)</small> - 完整的 API 參考文件</li>
<li><a href="../output/simulation-step-output.html">模擬步階輸出資訊</a> - 了解步階輸出的詳細資訊</li>
<li><a href="../theory-and-technique/milling-physics-coordinates.html">銑削物理座標系</a> - 了解座標系定義</li>
</ul>

</article>

        <div class="contribution d-print-none">
        </div>

        <div class="next-article d-print-none border-top" id="nextArticle"></div>

      </div>

      <div class="affix">
        <nav id="affix"></nav>
      </div>
    </main>

    <div class="container-xxl search-results" id="search-results"></div>

    <footer class="border-top text-secondary">
      <div class="container-xxl">
        <div class="flex-fill">
          <span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
        </div>
      </div>
    </footer>
  </body>
</html>
